home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World Komputer 2010 April
/
PCWorld0410.iso
/
hity wydania
/
Ubuntu 9.10 PL
/
karmelkowy-koliberek-desktop-9.10-i386-PL.iso
/
casper
/
filesystem.squashfs
/
usr
/
lib
/
byobu
/
logo
< prev
next >
Wrap
Text File
|
2009-10-11
|
3KB
|
119 lines
#!/bin/sh -e
#
# logo: determine which logo to use
# Copyright (C) 2008 Canonical Ltd.
#
# Authors: Dustin Kirkland <kirkland@canonical.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, version 3 of the License.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
PKG="byobu"
if [ "$1" = "--detail" ]; then
MARKUP="false"
exit 0
else
MARKUP="true"
fi
print_logo() {
distro=`echo "$1" | sed 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/' `
case "$distro" in
*ubuntu*)
$MARKUP && printf "\005{=b kr}\\\\\005{= ky}o\005{=b kY}/" || printf "\\o/"
;;
*altlinux*)
logo="alt"
$MARKUP && printf "\005{= Yk}$logo" || printf "$logo"
;;
*arch*)
logo=" A "
$MARKUP && printf "\005{=b wb}$logo" || printf "$logo"
;;
*centos*)
logo="****"
$MARKUP && printf "\005{= gw}*\005{= mw}*\005{= yw}*\005{= bw}*\005{=b Wk}" || printf "$logo"
;;
*debian*)
logo=" @ "
$MARKUP && printf "\005{= wr}$logo" || printf "$logo"
;;
*fedora*)
logo=" f "
$MARKUP && printf "\005{=b bw}$logo" || printf "$logo"
;;
*foresight*)
logo="<@>"
$MARKUP && printf "\005{=b Wg}$logo" || printf "$logo"
;;
*gentoo*)
logo=" > "
$MARKUP && printf "\005{=b cw}$logo" || printf "$logo"
;;
*mandriva*)
logo=" (* "
$MARKUP && printf "\005{=b kc} (\005{=b ky}* " || printf "$logo"
;;
*redhat*)
logo=" RH "
$MARKUP && printf "\005{= Rk}$logo" || printf "$logo"
;;
*rockhopper*)
logo="palm"
$MARKUP && printf "\005{=b YW}$logo" || printf "$logo"
;;
*slackware*)
logo=",S "
$MARKUP && printf "\005{=u Bk}$logo" || printf "$logo"
;;
*suse*)
logo="SuSE"
$MARKUP && printf "\005{= Wg}$logo" || printf "$logo"
;;
*xandros*)
logo=" X "
$MARKUP && printf "\005{= Wr}$logo" || printf "$logo"
;;
*)
logo="|B|"
$MARKUP && printf "\005{=b kW}$logo" || printf " $logo "
;;
esac
}
if [ -n "$LOGO" ]; then
# Allow users to define their own logo in $HOME/.$PKG/status
printf "%s" "$LOGO" && exit 0 || true
fi
if [ -n "$DISTRO" ]; then
# Allow manual override of distro in $HOME/.$PKG/status
print_logo "$DISTRO" && exit 0 || true
fi
if [ -r "/etc/issue" ]; then
# Otherwise, check /etc/issue
distro=`cat /etc/issue`
print_logo "$distro" && exit 0 || true
fi
# This can be a very expensive operation, do it only
# if all other methods fail
if which lsb_release >/dev/null 2>&1; then
distro=`lsb_release -s -a 2>/dev/null`
print_logo "$distro" && exit 0 || true
fi
# No idea!
printf "|B|"